home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / business / nonlin18.zip / MINFALL.NLR < prev    next >
Text File  |  1992-08-01  |  1KB  |  27 lines

  1. !
  2. ! An object begins a fall from position (1000,0) sliding along a frictionless
  3. ! guide to position (px,py). It then slides along another guide
  4. ! from (px,py) to position (0,1000).  Find px and py that minimize descent time.
  5. ! The minimum value of the function found by Nonlin is the descent time in
  6. ! seconds.  All coordinates are in centimeters.
  7. !
  8. Title Two segment path for fastest descent
  9. Register            ! Please register your use of Nonlin
  10. Constant G=980            ! Acceleration of gravity = 980 cm/sec^2
  11. Constant h=1000            ! Height from which object falls (cm.)
  12. Constant d=1000            ! Horizontal distance traveled during fall (cm.)
  13. Parameter px            ! X coordinate of bend
  14. Parameter py            ! Y coordinate of bend
  15. Constrain px=.1,999        ! px must be in range 0 < px < d
  16. Constrain py=.1,999        ! py must be in range 0 < py < h
  17. Function ;            ! Total descent time (what a monster)
  18. (sqrt(2*(sqrt(px^2+(py-h)^2))/(G*(h-py)/(sqrt(px^2+(py-h)^2))))) + ;
  19. ((sqrt(((G*(h-py)/(sqrt(px^2+(py-h)^2)))* ;
  20. (sqrt(2*(sqrt(px^2+(py-h)^2))/(G*(h-py)/(sqrt(px^2+(py-h)^2))))))^2+ ;
  21. 2*(G*py/(sqrt((px-d)^2+py^2)))*(sqrt((px-d)^2+py^2)))- ;
  22. ((G*(h-py)/(sqrt(px^2+(py-h)^2)))* ;
  23. (sqrt(2*(sqrt(px^2+(py-h)^2))/(G*(h-py)/ ;
  24. (sqrt(px^2+(py-h)^2)))))))/(G*py/(sqrt((px-d)^2+py^2))))
  25. Data
  26.  
  27.